package edu.fzu.fundmgr.service.impl;

import java.util.List;

import edu.fzu.fundmgr.dao.ClientDao;
import edu.fzu.fundmgr.dao.FinancialActDao;
import edu.fzu.fundmgr.dao.impl.ClientDaoJDBCImpl;
import edu.fzu.fundmgr.dao.impl.FinancialActDaoJDBCImpl;
import edu.fzu.fundmgr.domain.Client;
import edu.fzu.fundmgr.domain.FinancialAct;
import edu.fzu.fundmgr.service.ClientService;
import edu.fzu.fundmgr.service.FinancialActService;

public class FinancialActServiceImpl implements FinancialActService {

	public int addFinancialAct(FinancialAct fAct) {

		FinancialActDao fActDao = new FinancialActDaoJDBCImpl();
		return fActDao.addFinancialAct(fAct);
	}

	public List<FinancialAct> loadAll() {

		FinancialActDao fActDao = new FinancialActDaoJDBCImpl();
		return fActDao.loadAll();
	}

	public void removeFinancialAct(int accNO) {

		FinancialActDao fActDao = new FinancialActDaoJDBCImpl();
		fActDao.delFinancialAct(accNO);
	}

	public FinancialAct getFinancialAct(int accNO) {

		FinancialActDao fActDao = new FinancialActDaoJDBCImpl();
		return fActDao.getFinancialAct(accNO);
	}

	public void updateFinancialAct(FinancialAct fAct) {

		FinancialActDao fActDao = new FinancialActDaoJDBCImpl();
		fActDao.updateFinancialAct(fAct);
	}

	public void updateAmount(int accNO, double amount) {
		FinancialActDao fActDao = new FinancialActDaoJDBCImpl();
		fActDao.updateAmount(accNO,amount);
	}

}
